<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--<base href="http://localhost:8080/wanda/">-->
<base href=".">
<title>付款管理</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link href="../admin/Styles/css(1).css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../admin/Scripts/jquery.js"></script>
<script type="text/javascript"
	src="../admin/Scripts/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../admin/Scripts/layer.js"></script>
<link rel="stylesheet" href="../admin/Styles/layer.css"
	id="layui_layer_skinlayercss" style="">
<script type="text/javascript" src="../admin/Script/H-ui.admin.js	"></script>
<script type="text/javascript">
			function MM_jumpMenu(targ, selObj, restore) { //v3.0
				eval(targ + ".location='" + selObj.options[selObj.selectedIndex].value
						+ "'");
				if (restore)
					selObj.selectedIndex = 0;
			}
		</script>
<script>
			/*第一种形式 第二种形式 更换显示样式*/
			function setTab(name, cursel, n) {
				for (i = 1; i <= n; i++) {
					var menu = document.getElementById(name + i);
					var con = document.getElementById("con_" + name + "_" + i);
					menu.className = i == cursel ? "hover" : "";
					con.style.display = i == cursel ? "block" : "none";
				}
			}
			
			function prompt1(){
				var result = prompt("添加回款金额");
				var accomplishmoney = $("#accomplishmoney").val();
				var receivablemoney = $("#receivablemoney").val();
				if(Number(accomplishmoney)<Number(receivablemoney)){					
				if(result){					
					var huankuan = Number(accomplishmoney) + Number(result);
					var id = ${housepayment.id};
					$.ajax({
						url:"${pageContext.request.contextPath}/housepayment/beginReimbursement.action",
						type:"post",
						data:{huankuan:huankuan,id:id},
						dataType:'JSON',
						success:function(data){
							$("#accomplishmoney").val(data.housePayment.accomplishmoney);
							$("#uncollectedmoney").val(data.housePayment.uncollectedmoney);
							$("#state").val(data.housePayment.state);
								}							
							});				
						}
					}							
			}
			
			
			
				
</script>
</head>
<body>

	<div class="yboxwidth boxcenter">
		<div class="ybox09">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tbody>
					<tr>
						<td class="ybox10td1"><a href="javascript:void(0);"><img
								src="../admin/images/op8_1.gif" width="28" height="54"></a></td>
						<td>
							<table border="0" cellspacing="0" cellpadding="0">
								<tbody>
									<tr valign="top">

										<td class="ybox11td2">添加还款信息</td>

										<td class="ybox11td3"></td>
										<td class="ybox11td2"></td>

										<td class="ybox11td3"></td>
										<td class="ybox11td2"></td>

										<td class="ybox11td3"></td>
										<td class="ybox11td2"></td>

										<td class="ybox11td3"></td>
										<td class="ybox11td2"></td>

										<td class="ybox11td4"></td>

									</tr>
								</tbody>
							</table>
						</td>
						<td class="ybox10td1"><a href="javascript:void(0);"> <img
								src="../admin/images/op8_2.gif" width="28" height="54"></a></td>
					</tr>
				</tbody>
			</table>
		</div>

		<div class="ybox02">
			<!-- 			跳转action -->
		
				<table width="100%" border="0" cellspacing="0" cellpadding="0"
					class="margb4">
					<tbody>
						<tr>
							<td class="ybox03td1"></td>
							<td class="ybox03td2"></td>
							<td class="ybox03td3"></td>
						</tr>
						<tr>
							<td class="ybox03td4"></td>
							<td class="ybox03td5"><br>
								<div class="ybox05 margb8">
									<dl>
										<dt>付款信息</dt>
									</dl>
								</div>

								<table width="100%" border="0" cellpadding="0" cellspacing="1"
									class="ybox06table">
									<tbody>
										<tr>
											<td class="ybox06td01"><font color="red">*</font>应收金额</td>
											<td class="ybox06td01"><input type="text"
												name="receivablemoney" id="receivablemoney" value="${housepayment.receivablemoney }" readonly="readonly"></td>
												
											<td class="ybox06td01"><font color="red">*</font>已收金额</td>
											<td class="ybox06td01"><input type="text"
												name="accomplishmoney" id="accomplishmoney" value="${housepayment.accomplishmoney }"  readonly="readonly" onblur="prompt1()"></td>
												
											<td class="ybox06td01"><font color="red">*</font>未收金额</td>
											<td class="ybox06td01"><input type="text"
												name="uncollectedmoney" id="uncollectedmoney"  value="${housepayment.uncollectedmoney }" readonly="readonly"></td>
											
											<td class="ybox06td01"><font color="red">*</font>状态</td>
											<td class="ybox06td01"><input type="text"
												name="state" id="state"  value="${housepayment.state }" readonly="readonly"></td>
											
										</tr>
										<tr>
											<td class="ybox06td01"><font color="red">*</font>合同id</td>
											<td class="ybox06td01"><input type="text"
												name="bargainid" id="bargainid" readonly="readonly" value="${housepayment.bargainid }"></td>
												
											<td class="ybox06td01"><font color="red">*</font>房间id</td>
											<td class="ybox06td01"><input type="text"
												name="roomid" id="roomid" value="${housepayment.roomid }" readonly="readonly"></td>
												
											<td class="ybox06td01"><font color="red">*</font>收款时间</td>
											<td class="ybox06td01"><input type="text"
												name="collectionTime" id="collectionTime"  readonly="readonly"  value='<fmt:formatDate value="${housepayment.collectiontime }" pattern="yyyy-MM-dd HH:mm:ss"/>'></td>
										
											<td class="ybox06td01"><font color="red">*</font>房间编号</td>
											<td class="ybox06td01"><input type="text"
												name="number" id="number" readonly="readonly" value="${housepayment.number }"></td>
										</tr>

									</tbody>
								</table></td>
						</tr>
					</tbody>
				</table>


		</div>
	</div>
</body>
</html>